import React, { memo, useEffect, useState } from "react";
import { View, Button, Text } from "@tarojs/components";
import { Popup } from '@antmjs/vantui'
import Taro from '@tarojs/taro';


import './index.scss'

const DownLoadApp = (props) => {
  const { show = false } = props


  return (
    <Popup show={show} position='bottom' round closeable onClose={() => props.close()} className='popup-code'>
      <View className='qrpopup-center'>
        <View className='text1 black'>下载一道投APP</View>
        <View className='text-two' >点击复制链接后，在浏览器中打开网页，即可下载一道投APP</View>
        <View className='invite-url text5 black5'>{
          props?.downLoadUrl
        }</View>
        <Button className='copy-button' onClick={() => Taro.setClipboardData({ data: props?.downLoadUrl })}>复制链接</Button>
      </View>



    </Popup>
  );
};

export default memo(DownLoadApp);
